<?php
use think\facade\Route;
//微信服务端
Route::post("wechat/server",'wechat.course/server');
Route::get('login','user.login/login');
//支付宝支付
Route::get('pay/alipay', 'order.pay/aliPay');
//支付宝支付同步回调
Route::get('pay/return', 'order.pay/returnUrl');
//支付宝支付异步回调
Route::post('pay/notify', 'order.pay/notifyUrl');
//直播回调
Route::post('live/notify','live.live/notify');

Route::group(function () {
    //秒杀列表
    Route::get('seckillList','seckill.Seckill/seckillList');
    //获取用户信息
    Route::get('user/userinfo','user.User/getUserInfo');
    //根据SkuID获取sku
    Route::get("store/skuById","store.goods/getSkuById");
    //积分兑换商品列表
    Route::get("exchangeGoodsList","store.Exchange/getExchangeGoodsList");
    //兑换商品一条
    Route::get("exchangeGoodsDetails","store.Exchange/getExchangeGoodsDetails");
    //积分商品生成订单
    Route::post('orderIntegralGoods','order.Order/orderIntegralGoods');
    //砍价详情
    Route::get('bargain/getBargainDetail','store.bargain/getBargainDetail');
    //用户对此砍价活动的状态 是否参与
    Route::get('bargain/bargainUserStatus','store.bargain/bargainUserStatus');
    //砍价商品列表
    Route::get('bargain/getBargainList','store.bargain/getBargainList');
    //手机号登录
    Route::post('user/phoneLogin','user.login/PhoneLogin');
    //直播商品列表
    Route::get('live/goods','live.live/liveGoodsList');
    //直播标题接口
    Route::get('live/label','live.live/liveLabel');
    //分类商品列表
    Route::get('cateGoodsList','store.goods/cateGoodsList');
    //人脸检测
    Route::post('face/index','user.faceLogin/index');
//人脸识别
    Route::post('face/faceJc','user.facelogin/faceJc');
//人脸注册
    Route::post('face/faceRegister','user.facelogin/faceRegister');
//判断人脸注册
    Route::post('face/testingUser','user.facelogin/testingUser');
//商品详情
    Route::get('store/goodsDetail','store.goods/getGoodsDetail');
//用户登录注册模块
    Route::post('user/getCity','user.login/getCity');
//发送验证码
    Route::post('user/sendSms','user.login/sendSms');
//手机号注册
    Route::post('user/phoneRegister','user.login/phoneRegister');

//QQ第三方回调地址
    Route::get('notify','qq/notify');
    //首页轮播图
    Route::get('home/carousel','deploy.carousel/homeCarousel');
//快捷入口
    Route::get('home/quick','deploy.quick/quickEntry');
//es搜索
    Route::get('store/goodlist','store.goods/search');
//商品模块
    Route::get('store/commend','store.goods/commend');
//商品模块化查询
    Route::get('store/commendList','store.goods/commendList');
//商品分类
    Route::get('cates', 'store.goodscate/cates');
//商品热门推荐接口
    Route::get('store/recommend','store.goods/hotRecommend');
    //查询商品优惠券
    Route::get('store/getGoodsCouponList','store.GoodsCoupon/getGoodsCouponList');
    //查询通用优惠券
    Route::get('store/getCouponList','store.GoodsCoupon/getCouponList');
    //根据ID查询优惠券
    Route::get('store/getCoupon','store.GoodsCoupon/couponById');
    //获取签到积分
    Route::get('user/integral','user.User/userInfo');
    //0823  21:52 william 拼团分享
    Route::get('pink/share','store.Pink/pinkShare');

    //用户是否登录中间件验证
    Route::group(function () {
        Route::get('share/InvitationCode','user.user/shareInvitationCode');
       //查询物流轨迹地图
        Route::post('expressLocusFree','express.Express/getExpressLocusFree');
        Route::get("orderConfirmReceive",'order.Order/orderConfirmReceive');
        //保存弹幕接口
        Route::post('live/add/speak','live.LiveSpeak/add');
        //单商品详情页面
        Route::get('store/buyOne','store.goods/getGood');
        //秒杀详情
        Route::get('seckill/detail','seckill.seckill/getSeckillDetail');
        //余额支付
        Route::get('pay/yue','order.pay/yue');
        //保存弹幕接口 william
        Route::post('live/add/speak','live.LiveSpeak/add');
        //ID查找直播间信息
        Route::get('live/detail','live.live/liveById');
        //腾讯IM调用
        Route::get('live/im','live.live/userSig');
        //收货地址省市区三级联动
        Route::get('city','express.express/getProvinces');
//添加购物车
        Route::post('cart', 'cart.cart/addCart');
//减少购物车商品数量
        Route::get('cart/sub', 'cart.cart/subCartNum');
//增加购物车商品数量
        Route::get('cart/add', 'cart.cart/addCartNum');
//购物车列表
        Route::get('cart', 'cart.cart/carts');
//查询购物车
        Route::get('cart/bySku', 'cart.cart/findCartInfo');
//点击砍价
        Route::get('bargain/bargainRecode','store.bargain/bargainRecode');
        //获取砍价记录
        Route::get('bargain/getBargainUser','store.bargain/getBargainUser');
        //获取受邀用户的砍价状态
        Route::get('bargain/getHelpStatus','store.bargain/getHelpStatus');
        Route::get('bargain/getMyBargain','store.bargain/getMyBargain');
//获取好友帮砍列表
        Route::get('bargain/getBargainHelpPeople','store.bargain/getBargainHelpPeople');
        // 创建订单接口  author：William
        Route::post('order/create', 'order.Order/orderCreate');
        //机器人 author：William  客服
        Route::get('talk','Talk/index');
//百度敏感词
        Route::get('baiduTalk','Talk/baiduTalk');
        Route::get('user/addressByDetail','user.BindAddress/addressDetail');
        Route::get('pay/alipay', 'order.pay/aliPay');
//前台拼团列表接口
        Route::get('pink/list', 'store.Pink/pinkList');
//前台拼团详情接口
        Route::get('pink/Desc', 'store.Pink/pinkDesc');
//前台用户开团接口
        Route::post('pink/open', 'store.Pink/pinkOpen');
//前台用户正在参与拼团列表接口
        Route::get('pink/join', 'store.Pink/userInPink');
        //前台用户参与拼团商品记录
        Route::get('pink/join/desc', 'store.Pink/joinDesc');
        //前台用户分享拼团
        Route::get('pink/invitation', 'store.Pink/invitation');
        //前台拼团记录
        Route::get('pink/log', 'store.Pink/log');
//添加银行卡
        Route::post('user/bank','user.BankBind/bindBank');
//添加银行卡 发送手机号验证码
        Route::post('user/bank/sendSms','user.BankBind/sendSms');
//添加银行卡 验证码验证
        Route::post('user/bank/semVerification','user.BankBind/semVerification');
//提现申请
        Route::post('finance/Withdraw','finance.Withdraw/requestWithdraw');
//签到
        Route::post('user/sign','user.Sign/sign');
//查询签到配置
        Route::get('sign/deployList','user.Sign/deployList');
//查看今天是否签到
        Route::get('user/isSign','user.Sign/isSign');
//补签
        Route::post('user/retroactive','user.Sign/retroactive');
//添加地址
        Route::post('user/address','user.BindAddress/add');
//展示地址
        Route::get('user/address','user.BindAddress/address');
        //默认地址
        Route::get('user/default/address','user.BindAddress/defaultAddress');
//根据ID查询地址
        Route::get('user/addressById','user.BindAddress/addressToId');
//计算物流价钱接口
        Route::post('express/price','express.Express/expressPrice');
        //订单中心接口 author:William  08:16
        Route::get('order/status', 'order.Order/orderCenter');
//充值配置列表
        Route::get('recharge/list', 'deploy.Recharge/rechargeList');
        //用户充值接口 william
        Route::post('recharge/pay', 'deploy.Recharge/pay');
//查询订单售后状态列表
        Route::get('order/AfterSale', 'order.Order/afterSale');
//获取优惠券列表
        Route::get('store/getGoodsCouponList','store.GoodsCoupon/getGoodsCouponList');
//直播列表
        Route::get('live/list','live.live/liveList');
        //订单个人中心
        Route::get('order/status', 'order.Order/orderCenter');
//我的优惠卷
        Route::get('person/mycoupon','person.MyCoupon/couponList');
        Route::get('order/mycoupon','person.MyCoupon/couponOrder');
//用户收藏查看接口
        Route::get('user/collectionList','user.userCollection/collectionList');
        //设置密码
        Route::post('user/setPassword','user.login/setPassword');
        //用户收藏
        Route::get('user/collection','user.userCollection/collection');
        //用户关注
        Route::post('user/attention','user.userAttention/attention');
        //添加购物车
        Route::post('cart', 'cart.cart/addCart');
//减少购物车商品数量
        Route::get('cart/sub', 'cart.cart/subCartNum');
//增加购物车商品数量
        Route::get('cart/add', 'cart.cart/addCartNum');
//领取优惠券
        Route::post('store/collectCoupon','store.GoodsCoupon/collectCoupon');
//查询购物车
        Route::get('cart/bySku', 'cart.cart/findCartInfo');
//人脸更新
        Route::post('face/updateFace','user.facelogin/updateFace');
        //商品评论
        Route::post('store/goodsComment','store.goodsComment/comment');
        //商品评论点赞
        Route::get('store/commentLike','store.goodsComment/commentLike');
        //订单中心接口 author:William  08:16
//        Route::get('order/status', 'order.Order/orderCenter');
        //订单支付接口
        Route::post('order/pay', 'order.Order/orderPay');
        //快递路由接口
        Route::get('express/logistics','express.express/getExpressInquiry');
        //秒杀接口
        Route::get('seckill/action','seckill.seckill/doAction');
        //秒杀超时
        Route::get('timeout','seckill.seckill/timeout');
        //秒杀准备
        Route::get('seckill/init','seckill.seckill/init');
        //支付宝退款
        Route::get('pay/refund', 'order.pay/refund');
        //支付宝订单查询
        Route::get('pay/find', 'order.pay/find');
        //申请退款
        Route::post('order/refund','order.refund/refund');
        //取消退款
        Route::post('order/cancelRefund','order.refund/cancelTheRefund');
    })->middleware(\app\middleware\ApiUserLoginCheck::class);


})->middleware(\app\middleware\Throttle::class, [
    'key' => '__app__/__controller__/__action__/__ip__/__params__',
]);
